package drds.connection_pool.util;

/**
 * Created by ibm on 2019/1/3.
 */
public interface IConcurrentBagEntry
{
   int STATE_NOT_IN_USE = 0;
   int STATE_IN_USE = 1;
   int STATE_REMOVED = -1;
   int STATE_RESERVED = -2;

   boolean compareAndSet(int expectState, int newState);

   int getState();

   void setState(int newState);
}
